<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>游戏平台 - 猜数字排行榜</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <script>tailwind.config = {theme: {extend: {colors: {primary: '#3B82F6'}}}}</script>
  <style type="text/tailwindcss">@layer utilities { .content-auto { content-visibility: auto; } }</style>
</head>
<body class="bg-gray-50 font-sans min-h-screen">
<!-- 导航栏 -->
<nav class="bg-white shadow-md sticky top-0 z-50">
  <div class="container mx-auto px-4 py-3 flex justify-between items-center">
    <a href="/webapp/static" class="text-2xl font-bold text-primary flex items-center"><i class="fa fa-gamepad mr-2"></i>GamePlatform</a>
    <div class="hidden md:flex space-x-6 items-center">
      <a href="/game.html" class="text-gray-700 hover:text-primary transition-colors">猜数字游戏</a>
      <a href="/scoreboard.html" class="text-gray-700 hover:text-primary transition-colors">排行榜</a>
      <div id="userMenu" class="hidden"><button id="userBtn" class="flex items-center text-gray-700 hover:text-primary"><span id="username">游客</span><i class="fa fa-caret-down ml-1"></i></button>
        <div id="userDropdown" class="hidden absolute bg-white shadow-lg rounded-md mt-2 py-2 w-48 z-10">
          <a href="#" class="block px-4 py-2 text-gray-700 hover:bg-gray-100">个人中心</a>
          <a href="#" id="logoutBtn" class="block px-4 py-2 text-gray-700 hover:bg-gray-100">退出登录</a>
        </div>
      </div>
      <a href="/login.html" id="loginBtn" class="px-4 py-2 bg-primary text-white rounded-md hover:shadow-lg hover:-translate-y-0.5 transition-all">登录</a>
    </div>
    <button class="md:hidden text-gray-700" id="mobileMenuBtn"><i class="fa fa-bars text-xl"></i></button>
  </div>
  <div id="mobileMenu" class="hidden md:hidden bg-white border-t"><div class="container mx-auto px-4 py-3 flex flex-col space-y-3">
    <a href="/game.html" class="text-gray-700 hover:text-primary py-2">猜数字游戏</a>
    <a href="/scoreboard.html" class="text-gray-700 hover:text-primary py-2">排行榜</a>
    <div id="mobileUserMenu" class="hidden py-2"><button id="mobileUserBtn" class="flex items-center text-gray-700 hover:text-primary"><span id="mobileUsername">游客</span><i class="fa fa-caret-down ml-1"></i></button>
      <div id="mobileDropdown" class="hidden bg-white shadow-md rounded-md mt-2 py-2"><a href="#" class="block px-4 py-2 text-gray-700 hover:bg-gray-100">个人中心</a><a href="#" id="mobileLogoutBtn" class="block px-4 py-2 text-gray-700 hover:bg-gray-100">退出登录</a></div>
    </div>
    <a href="/login.html" class="px-4 py-2 bg-primary text-white rounded-md hover:shadow-lg transition-all text-center">登录</a>
  </div></div>
</nav>

<!-- 主内容 -->
<main class="container mx-auto px-4 py-8">
  <div class="max-w-4xl mx-auto">
    <div class="text-center mb-8">
      <h1 class="text-3xl font-bold text-gray-800 mb-2">猜数字游戏排行榜</h1>
      <p class="text-gray-600">看看谁是猜数字大师，猜中次数越少排名越高！</p>
    </div>

    <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
      <div class="bg-primary text-white p-4">
        <h2 class="text-xl font-bold">全球排行榜</h2>
      </div>

      <div class="p-4">
        <div class="flex justify-between items-center mb-4">
          <div class="text-sm text-gray-500">显示前 100 名玩家</div>
          <div class="flex space-x-2">
            <div class="relative">
              <select id="gameType" class="appearance-none bg-gray-100 border border-gray-300 text-gray-700 py-2 pl-3 pr-8 rounded-md leading-tight focus:outline-none focus:bg-white focus:border-primary">
                <option value="guess">猜数字游戏</option>
              </select>
              <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-500">
                <i class="fa fa-chevron-down text-xs"></i>
              </div>
            </div>
            <button id="refreshBtn" class="px-3 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg
